package com.bankscene.screenfit.adapters;


import com.bankscene.screenfit.data.Menus;
import com.bankscene.screenfit.vus.MenusListItemVu;

import java.util.ArrayList;
import java.util.List;

public class MenusListAdapter extends BasePresenterAdapter<MenusListItemVu> {

    List<String> titles = new ArrayList<>(Menus.VALUES_MAP.keySet());
    List<Menus> values = new ArrayList<>(Menus.VALUES_MAP.values());

    @Override
    protected void onBindListItemVu(int position) {
        vu.setVal(values.get(position));
    }

    @Override
    protected Class<MenusListItemVu> getVuClass() {
        return MenusListItemVu.class;
    }

    @Override
    public int getCount() {
        return titles.size();
    }

    @Override
    public Object getItem(int position) {
        return titles.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    public String getTitle(int position) {
        return (String) getItem(position);
    }

}
